package cn.cubix.flow.mapper;

import cn.cubix.flow.entity.WfRole;
import cn.cubix.flow.entity.WfRoleUser;
import cn.cubix.flow.entity.WfUser;
import com.baomidou.mybatisplus.core.conditions.Wrapper;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.baomidou.mybatisplus.core.toolkit.Constants;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

@Mapper
public interface WfRoleUserMapper extends BaseMapper<WfRoleUser> {
    Page<WfRoleUser> pageByUserId(Page<WfRoleUser> page,@Param("userId")String userId,@Param(Constants.WRAPPER) Wrapper<WfRole> ew);
    Page<WfRoleUser> pageByRoleId(Page<WfRoleUser> page,@Param("roleId")String roleId,@Param(Constants.WRAPPER) Wrapper<WfUser> ew);
    Page<WfRole> pageRoleAvailable(Page<WfRole> page, @Param("userId")String userId, @Param(Constants.WRAPPER) Wrapper<WfRole> ew);
    int nextPiority(@Param("userId")String userId);
}
